Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: adding new components #16845

Merged
merged 4 commits into from
Aug 12, 2019
Merged

Conversation

davewhitley
Copy link
Contributor

@davewhitley davewhitley commented Jul 31, 2019

Description

This is a first attempt at including some sort of guidance for adding/proposing/suggesting new components to the wordpress/components npm package. I pulled documentation from several different sources.

We need guidelines for:

  • Determining if a component should be added
  • Proposing a component
  • Testing the component
  • Deprecating components

It's not comprehensive, but I expect this document to evolve as we add more components.

cc @sarahmonster @karmatosed

Add component contribution guidelines
@davewhitley davewhitley added [Type] Developer Documentation Documentation for developers [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components labels Jul 31, 2019

## Deprecation

A component/feature may need deprecation if:
Copy link
Member

@gziolo gziolo Aug 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should emphasize that this applies not only to components but also to their props, whenever we add a new one, rename or remove. This should be reflected in the docs but at the same time we should ensure that old code still works as close as possible to what was before and deprecation warnings are outputted to the Web Console encouraging to use the new recommended version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this section belongs to this document, since this is generic and applies to any public API of the project. (A backward compatibility policy document)

Copy link
Member

@gziolo gziolo Aug 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my experience, it doesn't harm to repeat it a couple of times in our docs 😃

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea where our backward compatibility policy document is—linking to it here might be a good approach, but it's definitely helpful being as explicit as possible about our approach here, specifically with reference to how that works for components.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree there are some component specific things that can be included here.

Copy link
Member

@sarahmonster sarahmonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks 💯. Yay for contribution guidelines! I've made some (mostly nitpicky, fairy minor) changes and suggestions.

The three biggest changes I'd suggest are:

  • Simplifying language wherever possible to be more concrete and less abstract (including examples helps a lot) and to make it a bit friendlier to contributors whose first language isn't English.
  • Lead with documentation (or at least draft documentation) rather than with visual designs, to encourage people to think first about usage patterns, functionality, and semantics.
  • Make design, development, and accessibility reviews clear blockers to merging new components.

packages/components/src/CONTRIBUTING.md Outdated Show resolved Hide resolved
packages/components/src/CONTRIBUTING.md Show resolved Hide resolved
packages/components/src/CONTRIBUTING.md Outdated Show resolved Hide resolved
packages/components/src/CONTRIBUTING.md Outdated Show resolved Hide resolved
packages/components/src/CONTRIBUTING.md Outdated Show resolved Hide resolved

## Deprecation

A component/feature may need deprecation if:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea where our backward compatibility policy document is—linking to it here might be a good approach, but it's definitely helpful being as explicit as possible about our approach here, specifically with reference to how that works for components.

packages/components/src/CONTRIBUTING.md Outdated Show resolved Hide resolved
packages/components/src/CONTRIBUTING.md Show resolved Hide resolved
packages/components/src/CONTRIBUTING.md Show resolved Hide resolved
packages/components/src/CONTRIBUTING.md Outdated Show resolved Hide resolved
Small tweaks to improve copy.

Co-Authored-By: sarah ✈ semark <[email protected]>
@@ -0,0 +1,82 @@
# Contributing components
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Contributing to WordPress Interface Components"?

@davewhitley
Copy link
Contributor Author

davewhitley commented Aug 1, 2019

Thanks for the reviews everyone! I've gathered some non-blocking issues that need some next steps:

  • Create documentation/template for writing component guidelines
  • Better flowchart
  • Expand on the Deprecation section with specifics (communication channels, actual deprecation steps, etc.)

Can someone more knowledgeable that me please handle the last one in another PR?

@davewhitley
Copy link
Contributor Author

@sarahmonster mind giving this another look? I think it's ready to go and other improvements could be made in following PRs.

Copy link
Member

@sarahmonster sarahmonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks for the changes! 🚢

@mkaz mkaz merged commit 8bbe76c into master Aug 12, 2019
@mkaz mkaz deleted the add/component-contribution-guidelines branch August 12, 2019 18:57
gziolo pushed a commit that referenced this pull request Aug 29, 2019
* Initial commit

Add component contribution guidelines

* Apply suggestions from code review

Small tweaks to improve copy.

Co-Authored-By: sarah ✈ semark <[email protected]>

* Copy tweaks

* Simplify language
gziolo pushed a commit that referenced this pull request Aug 29, 2019
* Initial commit

Add component contribution guidelines

* Apply suggestions from code review

Small tweaks to improve copy.

Co-Authored-By: sarah ✈ semark <[email protected]>

* Copy tweaks

* Simplify language
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants